﻿<Window x:Class="WpfWordsLearner.Views.ImportView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:conv="clr-namespace:WpfWordsLearner.Converters"
        Title="Import from file"
        Width="350"
        Height="190"
        WindowStartupLocation="CenterOwner"
        WindowStyle="ToolWindow">
	<Grid>
		<Grid.Resources>
			<conv:BoolToVisibilityConverter x:Key="BoolToVis" />
		</Grid.Resources>
		<Grid.RowDefinitions>
			<RowDefinition />
			<RowDefinition Height="0.7*" />
		</Grid.RowDefinitions>
		<StackPanel Orientation="Vertical">
			<ComboBox x:Name="cmbFileType"
			          Width="140"
			          Height="22"
			          HorizontalAlignment="Left"
			          VerticalAlignment="Top"
			          SelectedIndex="0">
				<ComboBoxItem Content="Text file" />
				<ComboBoxItem Content="Xml file" />
			</ComboBox>
			<StackPanel Orientation="Horizontal">
				<TextBox x:Name="txtPath"
				         Width="250"
				         Margin="3,3,3,0"
				         HorizontalAlignment="Left"
				         VerticalAlignment="Bottom" />
				<Button x:Name="btnFile"
				        Width="50"
				        HorizontalAlignment="Right"
				        VerticalAlignment="Center"
				        Click="btnFile_Click"
				        Content="Choose"
				        IsDefault="True" />
			</StackPanel>
			<CheckBox x:Name="chkImp" Content="Import to content folder" />
			<TextBox x:Name="txtNewDict" Visibility="{Binding ElementName=chkImp, Path=IsChecked, Converter={StaticResource BoolToVis}}" />
		</StackPanel>
		<StackPanel Grid.Row="1" Margin="0,6,0,0">
			<Button x:Name="btnImport"
			        Width="70"
			        Height="27"
			        Click="btnImport_Click"
			        Content="Import" />
			<Button x:Name="btnCancel"
			        Width="70"
			        Height="27"
			        Click="btnCancel_Click"
			        Content="Cancel"
			        IsCancel="True" />
		</StackPanel>
	</Grid>
</Window>
